package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.dto.NursingProjectPageQueryDto;
import com.zzyl.entity.nursing.NursingProject;
import com.zzyl.vo.NursingProjectVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface NursingProjectMapper {
	/**
	 * 动态条件分页查询
	 * @param name
	 * @param status
	 * @return
	 */
	Page<NursingProjectVo> selectPage(@Param("name") String name, @Param("status") Integer status);
	
	/**
	 * 新增
	 * @param nursingProject
	 */
	int insertOne(NursingProject nursingProject);
	
	/**
	 * 根据主键查询一条记录
	 * @param id
	 * @return
	 */
	NursingProject selectOneById(Long id);
	
	/**
	 * 根据主键修改
	 * @param nursingProject
	 * @return
	 */
	int updateById(NursingProject nursingProject);
	
	/**
	 * 根据主键删除
	 * @param id
	 * @return
	 */
	int deleteById(Long id);
	
	/**
	 * 查询所有记录
	 * @return
	 */
	List<NursingProjectVo> selectVoList();

    Page<NursingProject> papegetlist(NursingProjectPageQueryDto nursingProjectPageQueryDto);

	void insertgetNursingProject(NursingProjectVo nursingProjectVo);

	NursingProjectVo getidlist(Long id);

	void updatestate(NursingProjectVo nursingProjectVo);

	void getidandstatus(Long id, Integer status);
	
	
@Delete("delete from nursing_project where id = #{id}")
	void deleteidstatus(Long id);

	List<NursingProject> getidnursingStatus();

	Page<NursingProject> selctNursingProjectList(NursingProject build);
	List<Map<String, Object>> selctMapList();
	
}